package com.blb.eduuserservice.controller;

import com.blb.common.entity.User;
import com.blb.common.util.ResponseResult;
import com.blb.eduuserservice.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


/**
 * 用户管理控制器
 */
@RestController
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping("/user/{id}")
    public ResponseResult<User> getUserById(@PathVariable Long id){
        User user = userService.getById(id);
        return ResponseResult.ok(user);
    }
}
